The field of the invention relates to information signals and more particularly to the compression of information signals.
Methods of compressing data are known. While methods vary widely, the objective of each method is to reduce a volume of a file by reducing the number of information bits necessary to accurately represent the file. In the past, a number of methods have been developed to achieve this objective. One method reduces a file""s volume by counting repeating bytes where ever they occur in a continuous sequence and representing the repeated bytes as simply the repeated byte followed by a number of instances of the repeated byte.
Other methods rely upon tables to re-arrange the meaning of bit sequences. Such tables are useful in the case where bit sequences frequently repeat, such as in text files.
Under these methods, a table is created and a table location (i.e., defined by the Cartesian coordinates) may be used to represent the contents of the location of the table. Further, the locations of the table may be ordered. The table locations may be identified by the smallest bit sequence necessary to precisely identify the location. Lower order locations require a lesser number of bits to precisely identify the location. Higher order locations require more bits to identify the location. For example, the first location may be given the identifier xe2x80x9c0xe2x80x9d. The second location may be given the identifier xe2x80x9c1xe2x80x9d, and the third xe2x80x9c10xe2x80x9d, and so on.
Under this method, the frequency of occurrence of the characters are measured. The character which is found to repeat the most frequently is placed in the lowest ordered location of the table. The next most frequently occurring character is placed next. Since the more frequently occurring characters require less bits to precisely identify the character, compression occurs by representing the character by a table location.
While table-based compression is effective in some cases, it is less effective in other cases where the data is random. Accordingly, a need exists for a compression method that can be used with or instead of table-based compression.
A method and apparatus are provided for compressing data. The method includes the steps of determining a flux, scaling factor and sign of a difference between a new sample and a previous sample and encoding the difference of the new sample over the previous sample based upon the determined flux, scaling factor and sign of the new sample.